﻿using LazyFramework;
using System;
using System.Collections.Generic;
using XLua;
using System.Reflection;
using System.Linq;

public static class HotfixCfg
{
    [Hotfix]
    public static List<Type> by_field = new List<Type>()
    {
        typeof(System.Func<UIType>),
        typeof(System.Func<UILayer>),
    };

    [Hotfix]
    public static List<Type> by_property
    {
        get
        {
            string[] allowNamespaces = new string[] {
                   "System",
                   "System.Boolean",
                "System.Collections",
                "LazyFramework.LUA.UI",
                "System.Collections.Generic",
                "System.Reflection",
                "UnityEngine.UI",
                    "LazyFramework",
                    "LazyFramework.UI",

                };
            return (from type in Assembly.Load("Assembly-CSharp").GetTypes()
                    where allowNamespaces.Contains(type.Namespace)
                    select type).ToList();
        }
    }
}